﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category0
{
  public class MTS42 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagSubItemDefinition U0008;

    [Description("System Authentication")]
    public Tag502 SystemAuthentication_502
    {
      get
      {
        return new Tag502((SwiftElement) this, 0, (SwiftDefinitionElement) MTS42.U0002);
      }
    }

    [Description("System Authentication")]
    public Tag502 Tag502_SystemAuthentication
    {
      get
      {
        return this.SystemAuthentication_502;
      }
    }

    [Description("Login/Select Error Code.")]
    public Tag503 ErrorCodeLoginSelect_503
    {
      get
      {
        return new Tag503((SwiftElement) this, 0, (SwiftDefinitionElement) MTS42.U0004);
      }
    }

    [Description("Login/Select Error Code.")]
    public Tag503 Tag503_ErrorCodeLoginSelect
    {
      get
      {
        return this.ErrorCodeLoginSelect_503;
      }
    }

    [Description("Date and time")]
    public Tag177 DateTime_177
    {
      get
      {
        return new Tag177((SwiftElement) this, 0, (SwiftDefinitionElement) MTS42.U0006);
      }
    }

    [Description("Date and time")]
    public Tag177 Tag177_DateTime
    {
      get
      {
        return this.DateTime_177;
      }
    }

    public MTS42()
      : base(true)
    {
    }

    public MTS42(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MTS42.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MTS42.MessageDefinition = new SwiftMessageDefinition("MTS42", "Login Negative Acknowledgement (LNK)");
      MTS42.U0002 = new SwiftTagDefinition("SystemAuthentication_502", "System Authentication");
      MTS42.U0002.TagName = "{502:";
      MTS42.U0003 = new SwiftTagSubItemDefinition("SystemAuthentication", "System Authentication");
      MTS42.U0002.Elements.Add((SwiftDefinitionElement) MTS42.U0003);
      MTS42.MessageDefinition.Elements.Add((SwiftDefinitionElement) MTS42.U0002);
      MTS42.U0004 = new SwiftTagDefinition("ErrorCodeLoginSelect_503", "Login/Select Error Code.");
      MTS42.U0004.TagName = "{503:";
      MTS42.U0005 = new SwiftTagSubItemDefinition("ErrorCodeLoginSelect", "Error Code");
      MTS42.U0004.Elements.Add((SwiftDefinitionElement) MTS42.U0005);
      MTS42.MessageDefinition.Elements.Add((SwiftDefinitionElement) MTS42.U0004);
      MTS42.U0006 = new SwiftTagDefinition("DateTime_177", "Date and time");
      MTS42.U0006.TagName = "{177:";
      MTS42.U0007 = new SwiftTagSubItemDefinition("Date", "Date");
      MTS42.U0006.Elements.Add((SwiftDefinitionElement) MTS42.U0007);
      MTS42.U0008 = new SwiftTagSubItemDefinition("Time", "Time");
      MTS42.U0006.Elements.Add((SwiftDefinitionElement) MTS42.U0008);
      MTS42.MessageDefinition.Elements.Add((SwiftDefinitionElement) MTS42.U0006);
    }
  }
}
